
const path = require("path");

function resolve(dir) {
  return path.join(__dirname, dir);
}
const { generateTheme } = require("antd-theme-generator");
// ant-design-vue/dist/antd.less
const options = {
  antDir: path.join(__dirname, "./node_modules/ant-design-vue"), // 对应具体位置
  stylesDir: path.join(__dirname, "./src/styles/theme"),    // 对应具体位置
  varFile: path.join(__dirname, "./src/styles/theme/variables.less"), // 对应具体位置
  mainLessFile: path.join(__dirname, "./src/styles/theme/index.less"), // 对应具体位置
  themeVariables: [
    "@primary-color",
    "@secondary-color",
    "@text-color",
    "@text-color-secondary",
    "@heading-color",
    "@layout-body-background",
    "@btn-primary-bg",
    "@layout-header-background",
    "@btn-primary-color",
    "@background-color-base",
    
    
    "@border-color-base",
    "@component-background",
    "@table-header-bg",
    "@table-row-hover-bg",
    "@descriptions-bg",
    "@table-selected-row-bg",
    "@background-color-light",
    "@item-hover-bg",
    "@item-active-bg",
    "@table-header-sort-bg",
    "@icon-color-hover",
    "@disabled-color",
    "@primary-1",
    "@select-tree-item-selected-bg",
    "@tree-node-selected-bg",
    "@select-item-selected-bg",
    // "@theme-color",
    // "@theme-text-color",

    "@collapse-bg",
    "@cascader-picker-arrow-color"
  ],
  indexFileName: "index.html",
  outputFilePath: resolve("./public/color.less"),
};
generateTheme(options).then(() => {
}).catch((error) => {
  console.log(error);
  });
